<?php /* Smarty version 2.6.25, created on 2013-11-07 14:18:08
         compiled from exercise/views/admin.new-exercise-para.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'count', 'exercise/views/admin.new-exercise-para.tpl', 93, false),array('block', 'l', 'exercise/views/admin.new-exercise-para.tpl', 153, false),)), $this); ?>
<script type="text/javascript" src="<?php echo $this->_tpl_vars['LAYOUT_HELPER_URL']; ?>
admin/js/ckeditor/ckeditor.js"></script> 
<script type="text/javascript" src="<?php echo $this->_tpl_vars['LAYOUT_HELPER_URL']; ?>
admin/js/ckfinder/ckfinder.js"></script>  
<link href="<?php echo $this->_tpl_vars['LAYOUT_HELPER_URL']; ?>
admin/js/jquery-ui/css/ui-lightness/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="<?php echo $this->_tpl_vars['LAYOUT_HELPER_URL']; ?>
admin/js/jquery-ui/js/jquery-ui.js"></script>
<script src="<?php echo $this->_tpl_vars['LAYOUT_HELPER_URL']; ?>
admin/js/jquery.slug.js"></script>

<script type="text/javascript">
    //<![CDATA[

    jQuery(document).ready(function (){
        CKFinder.setupCKEditor( null, '<?php echo $this->_tpl_vars['LAYOUT_HELPER_URL']; ?>
admin/js/ckfinder/' );
        jQuery( "#images" ).sortable();
        //jQuery( "#images" ).disableSelection();
        //Datepicker
        jQuery( ".date" ).datepicker({
            showAnim        : 'slideDown',
            showButtonPanel : true,
            dateFormat      : '<?php echo $this->_tpl_vars['datepickerFormat']['js']; ?>
'
        });
        //Make slug
        <?php $_from = $this->_tpl_vars['allLangs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['langDiv'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['langDiv']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['item']):
        $this->_foreach['langDiv']['iteration']++;
?>
        jQuery('#title_a<?php echo $this->_foreach['langDiv']['iteration']; ?>
').makeSlug({
            slug: jQuery('#alias<?php echo $this->_foreach['langDiv']['iteration']; ?>
')
        });
        <?php endforeach; endif; unset($_from); ?>
        
    });
    var imgId;
    function chooseImage(id)
    {
        imgId = id;
        // You can use the "CKFinder" class to render CKFinder in a page:
        var finder = new CKFinder();
        finder.basePath = '<?php echo $this->_tpl_vars['LAYOUT_HELPER_URL']; ?>
admin/js/ckfinder/'; // The path for the installation of CKFinder (default = "/ckfinder/").
        finder.selectActionFunction = setFileField;
        finder.popup();
    } 
    // This is a sample function which is called when a file is selected in CKFinder.
    function setFileField( fileUrl )
    {
        document.getElementById( 'chooseImage_img' + imgId ).src = fileUrl;
        document.getElementById( 'chooseImage_input' + imgId).value = fileUrl;
        document.getElementById( 'chooseImage_div' + imgId).style.display = '';
        document.getElementById( 'chooseImage_noImage_div' + imgId ).style.display = 'none';
    }
    function clearImage(imgId)
    {
        document.getElementById( 'chooseImage_img' + imgId ).src = '';
        document.getElementById( 'chooseImage_input' + imgId ).value = '';
        document.getElementById( 'chooseImage_div' + imgId).style.display = 'none';
        document.getElementById( 'chooseImage_noImage_div' + imgId).style.display = '';
    }

    function addMoreImg()
    {
        jQuery("ul#images > li.hidden").filter(":first").removeClass('hidden');
    }

//]]>
</script>
<style type="text/css">
    #images { list-style-type: none; margin: 0; padding: 0;}
    #images li { margin: 10px; float: left; text-align: center;  height: 180px;}
</style>


       
            <div class="content-box"><!-- Start Content Box -->
                
                <div class="content-box-header">
                    
                    <h3>New Exercise</h3>
                    
                    <ul class="content-box-tabs">
                        <?php if ($this->_tpl_vars['fullPermisison']): ?><li><a href="#tab0" class="default-tab">General</a></li><?php endif; ?>
                        <?php $_from = $this->_tpl_vars['allLangs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['langTab'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['langTab']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['item']):
        $this->_foreach['langTab']['iteration']++;
?>
                        <li><a <?php if (! $this->_tpl_vars['fullPermisison'] && ($this->_foreach['langTab']['iteration'] <= 1)): ?>class="default-tab"<?php endif; ?> href="#tab<?php echo $this->_tpl_vars['item']['lang_id']; ?>
" style="padding-bottom: 4px;"><image style="vertical-align:middle;" src="<?php echo $this->_tpl_vars['BASE_URL']; ?>
<?php echo $this->_tpl_vars['item']['lang_image']; ?>
"> <?php echo $this->_tpl_vars['item']['name']; ?>
</a></li>
                        <?php endforeach; endif; unset($_from); ?>
                    </ul>
                    
                    <div class="clear"></div>
                    
                </div> <!-- End .content-box-header -->
                
                <div class="content-box-content">
                
                    <form action="" method="post">
                    
                    <!-- GENERAL -->
                    <div class="tab-content <?php if (! $this->_tpl_vars['fullPermisison']): ?>hidden<?php endif; ?>" id="tab0">
                    
                        <!-- ERROR -->
                        <?php if (count($this->_tpl_vars['errors']) > 0): ?>
                        <div class="notification error png_bg">
                            <a href="#" class="close"><img src="<?php echo $this->_tpl_vars['LAYOUT_HELPER_URL']; ?>
admin/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
                            <div>
                                <?php if ($this->_tpl_vars['errors']['main']): ?>
                                    Error: <?php echo $this->_tpl_vars['errors']['main']; ?>

                                <?php else: ?>
                                    Error: Please check following information again
                                <?php endif; ?> 
                                                                       
                            </div>
                        </div>
                        <?php endif; ?>
                            
                            <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
                                <p>
				                    <label>Category<span class="red">*</span></label>              
				                    <select name="data[exercise_lib_id]" class="small-input" style="width:380px">
				                        <?php $_from = $this->_tpl_vars['exerciseLib']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['item']):
?>
				                        <option value="<?php echo $this->_tpl_vars['item']['exercise_lib_id']; ?>
" <?php if ($this->_tpl_vars['data']['exercise_lib_id'] == $this->_tpl_vars['item']['exercise_lib_id']): ?>selected="selected"<?php endif; ?>><?php echo $this->_tpl_vars['item']['name']; ?>
</option>
				                        <?php endforeach; endif; unset($_from); ?>
				                    </select> 
				                </p>
                                
                               
                                
                             </br>

					<p><label>Parameter</label>
					<input type="text" class="text-input small-input" type="text" style="width:364px;" name="data[parameter]"/></p>

           <p>
                <br/>
                 <a href="<?php echo $this->_tpl_vars['BASE_URL']; ?>
libs/BKED/selection_sort/index-pre.html" target='_blank' ><input class="button" type="button" value="Demo" /></a>
                
            </p>  
                                          
                                
                            
                                
                              
                                
                                <p>
                                <br/>
                                    <input class="button submit" type="button" value="Save" />
                                </p>
                                
                            </fieldset>
                            
                            
                            <div class="clear"></div><!-- End .clear -->
                            
                    </div>  <!-- End GENERAL --> 
                    
                    <?php $_from = $this->_tpl_vars['allLangs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['langDiv'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['langDiv']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['item']):
        $this->_foreach['langDiv']['iteration']++;
?>
                    <!-- LANGUAGES -->
                    <div class="tab-content <?php if ($this->_tpl_vars['fullPermisison'] || ! ($this->_foreach['langDiv']['iteration'] <= 1)): ?>hidden<?php endif; ?>" id="tab<?php echo $this->_tpl_vars['item']['lang_id']; ?>
">
                    
                            <fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->
                                <p>
                                    <label><?php $this->_tag_stack[] = array('l', array()); $_block_repeat=true;Nine_View_Register_Translation::translate($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Title<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo Nine_View_Register_Translation::translate($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></label>
                                        <input id="title<?php echo $this->_foreach['langDiv']['iteration']; ?>
" class="text-input small-input" type="text"  name="data[<?php echo $this->_tpl_vars['item']['lang_id']; ?>
][title]" value="<?php echo $this->_tpl_vars['data'][$this->_tpl_vars['item']['lang_id']]['title']; ?>
" />
                                </p>
                                <label><?php $this->_tag_stack[] = array('l', array()); $_block_repeat=true;Nine_View_Register_Translation::translate($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Description<?php $_block_content = ob_get_contents(); ob_end_clean(); $_block_repeat=false;echo Nine_View_Register_Translation::translate($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); }  array_pop($this->_tag_stack); ?></label>
                                <br>
                                <p>
                                    <div><textarea style="float:left;" class="text-input textarea ckeditor"  name="data[<?php echo $this->_tpl_vars['item']['lang_id']; ?>
][description]" rows="10" cols="70"><?php echo $this->_tpl_vars['data'][$this->_tpl_vars['item']['lang_id']]['description']; ?>
</textarea>
                                    </div>
                                    
                                </p>
                                <p>
                                <br/>
                                    <input class="button submit" type="button" value="Save" />
                                </p>
                                
                            </fieldset>
                            
                            <div class="clear"></div><!-- End .clear -->
                            
                    </div>
                                
                        
                    <?php endforeach; endif; unset($_from); ?>
                    
                  </form>
                  
                </div> <!-- End .content-box-content -->
                
            </div> <!-- End .content-box -->
            
            
            <div class="clear"></div>
